﻿@model IEnumerable<Bordspil.Models.UserProfile>

<ul id="group-menu">
    <li>@Html.ActionLink("Nýr kerfisstjóri", "Admin", "Account", new { userName = User.Identity.Name }, null)</li> 
    <li>@Html.ActionLink("Allir notendur","GetAllUsers", "Account")</li>
</ul>

<div id="groups">
   <h3 class="group-name">Allir notendur</h3>
<table id="all-users">
    <tr>
        <th>Nafn</th>
        <th>Aldur</th>
        <th>Netfang</th>
        <th>Prófílmynd</th>
    </tr>
    @foreach (var user in Model)
    {
         <tr>
             <td>@Html.ActionLink(user.UserName, "UserProfile", "Account", new { userName = user.UserName}, null) </td>
             <td id="all-users">@user.Age</td>
             <td><a href ="mailto:@user.Email?Subject=Viðvörun">@user.Email</a></td>
             <td> <img id = "AdminManagePicture" src='@Url.Action("GetAvatarByName", "Account", new { userName = user.UserName })', alt="Notendamynd" /></td>
         </tr>
    }
</table>
</div>